package com.alpha.eceasy.mall.service.impl;

import com.alpha.eceasy.extension.BaseFormInfo;
import com.alpha.eceasy.mall.api.entity.Product;
import com.alpha.eceasy.mall.mapper.ProductMapper;
import com.alpha.eceasy.mall.service.ProductService;
import com.alpha.eceasy.extension.BaseServiceImpl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 货品信息表 服务实现类
 * </p>
 *
 * @author huangpengfei
 * @since 2024-05-16
 */
@Service
public class ProductServiceImpl extends BaseServiceImpl<ProductMapper, Product> implements ProductService {
    public Boolean updateStatusIdByGuid(String infoProductGuid, Byte statusId) {
        return this.update(Wrappers.<Product>lambdaUpdate()
                .eq(BaseFormInfo::getGuid, infoProductGuid)
                .set(Product::getStatusId, statusId));
    }
}
